Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

204
Vistas
Javascript: "Uncaught SyntaxError: Identifier starts immediately after numeric literal"

I am getting the error "Uncaught SyntaxError: Identifier starts immediately after numeric literal". As I understand, this is from the variable identifier starting with a number, which I'm trying pass through in the function. I saw here to use escape identifiers, but there was no concrete solution on how to add them in when using PHP, which I am having difficulty implementing.

Html

<button class = "btn btn-primary edButton" onclick='edit_function(\""<?php echo $var; ?>"\\")'>action</button>

Js

function edit_function(id) {
...
about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

You can't start a variable in JavaScript with a digit. There is no way to escape it.

about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda